package com.cjw.pojo.dto.database;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@ToString
public class ResourceDTO extends BaseDTO implements Serializable {
    @ApiModelProperty("资源名称")
    private String name;

    @ApiModelProperty("资源url")
    private String url;

    @ApiModelProperty("组件路径")
    private String src;

    @ApiModelProperty("图标")
    private String icon;

    @ApiModelProperty("父节点ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long parentId;

//    @ApiModelProperty("类型")
//    private Integer type;

    @ApiModelProperty("子资源")
    private List<ResourceDTO> children;
}
